package com.wzxy.spider.tbw.service.impl;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wzxy.spider.tbw.entity.TbwNews;
import com.wzxy.spider.tbw.repository.TbwRepository;
import com.wzxy.spider.tbw.service.ITbwService;
import com.wzxy.wzinfo.service.impl.MyJpaService;

@Service("tbwService")
public class TbwService extends MyJpaService<TbwNews,Integer> implements ITbwService {
	private TbwRepository tbwRepository;

	@Autowired
	public void setTbwRepository(TbwRepository tbwRepository) {
		this.tbwRepository = tbwRepository;
		super.setJpaRepository(tbwRepository);
		super.setJpaSpecificationExecutor(tbwRepository);
	}
	
	@PersistenceContext
	protected EntityManager em;

	@Override
	public List<TbwNews> saveAll(List<TbwNews> list_t) {
		return tbwRepository.save(list_t);
	}

	
}
